<div class="desc headwrap">
    <h1><img alt="Đấu trường 100" src="<?php echo $baseurl?>public/theme/images/dautruong.png"/></h1>
    <h2>Gameshow truyền hình tương tác</h2>
</div>
<div class="box-one">
    <?php /*$attr = array();*/ echo form_open('')?>
        <div class="form-min">
            <p class="label"><label>Đăng nhập Game Show</label></p>
            <p><input type="text" class="iptbox" name="username" placeholder="Tên đăng nhập"/></p>
            <p><input type="password" class="iptbox" name="password" placeholder="Mật khẩu"/></p>
            <p><button type="submit" class="btn btn-login">Đăng nhập</button></p>
        </div>
    </form>
    <a class="face-login" href="#login-fb"><span class="icon-facebook"></span></a>
    
    <div class="register-here"><a href="<?php echo $baseurl?>register">Đăng ký nếu chưa có tài khoản</a></div>
</div>
<div class="nav tooltips clearfix">
    <ul>
        <li><a class="item" href="<?php echo $baseurl?>"><span class="icon-home"></span><p class="hidden">Trang chủ</p></a></li>
        <li><a class="item" href="<?php echo $baseurl?>policy"><span class="icon-policy"></span><p class="hidden">Điều lệ</p></a></li>
        <li><a id="chart" class="item" href="#"><span class="icon-chart"></span><p class="hidden">Xếp hạng</p></a></li>
    </ul>
</div>
<script>
var audio0 = new Audio('public/theme/audio/telefonjoker_anruf.mp3'); 
audio0.loop = true;
audio0.play(); 
</script>
<script>
$(function(){
   $('a[href="#login-fb"]').click(function()
   {
        html = 'Xin chờ, đang đăng nhập ...';
        $(".form-min").css({'color': '#444', 'margin-top': '20%'}).html(html);
        $.ajax({
            url: '<?php echo $baseurl?>login-fb',
            type: "GET",
            data:({username: $("#username").val(), pword: $("#pword").val()}),
            success: function(data)
            {
                var data = jQuery.parseJSON(data);
                if(data.status == '200')
                {
                    location.reload();
                }else if(data.status == '203'){
                    //alert(data.url);
                    window.location = data.url;
                }
            }
       }); 
       return false;
   }); 
});
</script>